<?php $this->headScript()->appendFile($this->JS_PATH . 'preference.js'); ?>
<div id="MainContent">
    <div>
        <div class="pageerrorcontainer-validator">
            <div class="error-iterator"></div>
        </div>
    </div>
    
    <?php if ($this->succesMessage != ""): ?>
    <div class='pagemcontainer'>
        <p class='pagemessage'>
            <img src="<?php echo $this->IMAGE_PATH;?>icons/system/accept.gif" class="systemicon" alt="Success" title="Success" />
            <label class='errorlabel'><?php echo $this->succesMessage; ?></label>
        </p>
    </div>
    <?php endif; ?>			
    
    <?php if (count($this->errorMessageArray) > 0): ?>
        <div class="pageerrorcontainer">
            <?php foreach ($this->errorMessageArray as $erroValue): ?>
                <div class="pageoverflow">
                    <img src="<?php echo $this->IMAGE_PATH;?>icons/system/stop.gif" class="systemicon" alt="Error" title="Error" />
                    <label class="errorlabel"><?php echo $erroValue; ?></label>
                </div>
            <?php endforeach; ?>				
        </div>
    <?php endif; ?>			
    <div class="clearb">&nbsp;</div>
    <div id="preference"></div>
    <div class="pagecontainer pageoverflow">
        <div class="pageheader">
            Edit Profile
            <div class="field-required">* Fields are required </div>
        </div>
        <div style="clear: both;"></div>
        <form id="profile-form" name="profile-form"  enctype="multipart/form-data"  action="" method="post">
            
            <div id="page_content">
                <div class="pageoverflow">
                    <div class="pagetext">First Name<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_firstname; ?>
                    </div>
                </div>


                <div class="pageoverflow">
                    <div class="pagetext">Last Name<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_lastname; ?>
                    </div>
                </div>
                
                <div class="pageoverflow">
                    <div class="pagetext">Company Name<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_companyname; ?>
                    </div>
                </div>
                
                
                <div class="pageoverflow">
                    <div class="pagetext">Registration Number<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_registration_number; ?>
                    </div>
                </div>
                
                <?php if ($this->data['adm_logo'] == ""): ?>
                <br/>
                <div id="upload-image-container" class="pageoverflow upload-image-container">
                    <p class="pagetext">(Image should be 200 X 200 [width X height] for better results as it will be displayed in quotations page)</p>
                    <p class="pageinput">
                        <input id="image_id" name="adm_logo"  class="image_class" type="file" />
                    </p>
                </div>
                <?php endif; ?>
                
                <div class="pageoverflow">
                    <?php if ($this->data['adm_logo'] != ""): ?>
                        <br/>
                        <br/>
                        <div class="pageoverflow image-container">
                            <div class="floatleft pageinput">
                            <?php 
                                $src_path = $this->PUBLIC_PATH . "upload/company/".$this->data['adm_logo']; 
                            ?>
                                <a style="text-decoration: none;" class="lightbox" href="<?php echo $src_path; ?>">
                            <img src="<?php echo $src_path; ?>" height="200" width="200"/>&nbsp;
                                </a>
                            </div>
                            <div class="floatleft">
                                <input type="button" value="Edit Company Logo" name="<?php echo $this->data['adm_logo']; ?>" class="image-delete" />
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
                
                
                
                <div class="pageoverflow">
                    <div class="pagetext">Company Address<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_address; ?>
                    </div>
                </div>
                
                <div class="pageoverflow">
                    <div class="pagetext">Company Telephone<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_telephone; ?>
                    </div>
                </div>
                
                
                <div class="pageoverflow">
                    <div class="pagetext">Company Fax number<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_fax; ?>
                    </div>
                </div>
                
                <div class="pageoverflow">
                    <div class="pagetext">Company Mobile number<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_mobile; ?>
                    </div>
                </div>
                
                
                <div class="pageoverflow">
                    <div class="pagetext">Old Password<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->old_password; ?>
                    </div>
                </div>
                
                <div class="pageoverflow">
                    <div class="pagetext">Password<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_password; ?>
                    </div>
                </div>
                
                <div class="pageoverflow">
                    <div class="pagetext">Confirm Password<span class="error-star">*</span>:</div>
                    <div class="pageinput">
                        <?php echo $this->form->adm_confirmpassword; ?>
                    </div>
                </div>
                
                
                
                    
                

                

                <div class="pageoverflow">
                    <p class="pagetext">&nbsp;</p>
                    <p class="pageinput">
                        <?php echo $this->form->Save; ?>
                        <?php echo $this->form->Reset; ?>
                    </p>
                </div>
                <div style="clear: both;"></div>
            </div>
        </form>
    </div>
    <p class="pageback">
        <a class="pageback" href="<?php echo $this->url(array('controller' => 'index', 'action' => 'index'), null, TRUE) ?>">&#171; Back to Home</a>
    </p>
    <div class="clearb"></div>
</div>